<?php
function insert_getSession(){
	global $arrGWeb;
	if(!empty($_SESSION['user_name'])){
		$strHtml = '<div class="logined">' . $_SESSION['user_name'] . ' 您好!欢迎您的到来！　<a href="' . $arrGWeb['WEB_ROOT_pre'] .'/useradmin" target="_self"><font color=#FF6600>[&nbsp;会员管理中心&nbsp;]</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . $arrGWeb['WEB_ROOT_pre'] . '/user/logout.php" target="_self"><font color=#FF6600>[&nbsp;安全退出&nbsp;]</font></a></div>';
	}else{
		$strHtml = '

		<form method="post" name="form_login" action="'.$arrGWeb['WEB_ROOT_pre'].'/user/login.php" onsubmit="if(form_login.User.value==\'\' || form_login.Pass.value==\'\') {alert(\'请输入用户名、密码！\');return false}">
		<div class="login">
		<div class="headregl">帐号：
      <input name="User" type="text" style="width:80px;background:#E9E9E9;" class="headreg"/>
	  密　码：
      <input name="Pass" type="password"  style="width:80px;background:#E9E9E9;" />
	  </div>
	  <div class="headregr">&nbsp;&nbsp;<input type="image" name="index_login_button" id="button" src="'.$arrGWeb['templats_root'].'/images/submitimage.png" value="登录"/>
      </div>
	  </div><ul><li class="loginjt"><a href="'.$arrGWeb['WEB_ROOT_pre'].'/user/regin.php" >注册帐号</a></li>
	  <li class="loginjt"><a href="'.$arrGWeb['WEB_ROOT_pre'].'/user/forgotten.php" >忘记密码</a></li>
	  </ul>
	  </form>
	  ';
	}
		return $strHtml;
}
?>
